<div class="modal-dialog modal-lg">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button"
                    class="close"
                    data-dismiss="modal"
                    aria-label="Close"
                    ng-click="closeThisDialog()" style="outline: none;"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">
                <span>出库/入库记录</span>
            </h4>
        </div>
        <div class="modal-body">
            <div class="callout callout-info">
                <h4>{{sku.product.name}}, 分类: {{sku.product.category.name}}, 现有库存: {{sku.quantity}}, 单位: {{sku.product.unit}}</h4>
            </div>
        </div>
        <div class="modal-body">
            <table ng-table="recordTable" class="table table-striped">
                <tr ng-repeat="(index,record) in $data">
                    <td width="100"
                        data-title="'#'">
                        <span class="editable-text" ng-bind="record.id"></span>
                    </td>
                    <td width="200" data-title="'物料名称'">
                        <span class="editable-text" ng-bind="record.sku.product.name"></span>
                    </td>
                    <td width="100"
                        data-title="'入库单位价格'">
                    <span class="editable-text" ng-if="record.price > 0">
                        {{record.price}} 元
                    </span>
                    <span class="editable-text" ng-if="record.price == 0">
                        -
                    </span>
                    </td>
                    <td width="100"
                        data-title="'入库/出库量'">
                        <span class="editable-text" ng-bind="record.quantity"></span>
                    </td>
                    <td width="100"
                        data-title="'现有量'">
                        <span class="editable-text" ng-bind="record.sku.quantity"></span>
                    </td>
                    <td data-title="'日期'">
                        添加日期: {{record.created_at}}<br/>
                    </td>
                    <td data-title="'备注'">
                        <span ng-if="record.note">{{product.note}}</span>
                        <span ng-if="!record.note">无</span>
                    </td>
                </tr>
                <tr ng-show="!$data.length">
                    <td colspan="10" class="text-center">暂无相关物料</td>
                </tr>
            </table>
        </div>
        <div class="overlay" ng-show="recordTable.settings().$loading">
            <i class="fa fa-refresh fa-spin"></i>
        </div>
    </div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
